package code

import (
	"context"
	"fmt"

	"github.com/docker/docker/api/types/container"
)

// 列出和管理容器
func ContainerList() {
	//code.ContainerBack()

	cli := InitClient()

	containers, err := cli.ContainerList(context.Background(), container.ListOptions{})
	if err != nil {
		panic(err)
	}

	for _, container := range containers {
		fmt.Println(container.ID)
	}
}
